#include <iostream>
using namespace std;
int main ()
{
int n;
double a;
cout<<"a="; cin>>a;
cout<<"n="; cin>>n;
int st;
st=1;
for(int i=0; i<n; i++)
{st=st*a; cout<<"a^"<<i+1<<"="<<st<<"\n";}
return 0;
}
